package com.syni.mdd.sjb.common.datatreaure.constants;

import java.util.HashMap;

/**
 * @className 用于存放系统级别的静态变量
 * @Author cfx
 * @DATE 2019/7/25 10:21
 * @VERSION 1.0
 **/
public class Constants extends com.syni.mdd.sjb.common.component.utils.common.constants.Constants {
    public static final String COMMON_FLAG_FALSE = "0"; // 通用标志-否
    public static final String COMMON_FLAG_TRUE = "1"; // 通用标志-是
    public static final int  COMMON_FLAG_FALSE_INT = Integer.parseInt(COMMON_FLAG_FALSE);
    public static final int COMMON_FLAG_TRUE_INT = Integer.parseInt(COMMON_FLAG_TRUE);
    public static final int COMMON_FLAG_TRUE_INT_NO = 2;
    public static final int COMMON_SECOND = -2;

    /*----------------------------------------------------------*/
    public static final String REDIS_KEY_PREFIX = "user:";  //Redis键前缀
    public static final String REDIS_KEY_TOKEN = REDIS_KEY_PREFIX + "TOKEN:";
    public static final String REDIS_KEY_MINITOKEN = REDIS_KEY_PREFIX + "minitoken:userId";
    public static final String REDIS_KEY_VERIFICATION_CODE = "dsApi:identifyCode:";
    public static final String REDIS_KEY_CDP_ACCESS_TOKEN = "dxApp:cdp:accessToken";

    /*----------------------------------------------------------*/

    public static final int APP_CLIENT = 2;         //App端
    public static final int WECHAT_MINAPP = 3;          //微信小程序端
    public static final int ALI_MINAPP = 4;          //支付宝小程序端

    public static final int WECHAT_CLIENT = 1;          //微信端
    public static final int ANDROID_CLIENT = 2;             //安卓端
    public static final int IOS_CLIENT = 3;             //ios端
    public static final int SMALL_PROGRAM = 4;          //微信小程序端
    public static final int SMALL_ALI_CLIENT = 5;       //支付宝小程序
    public static final int H5_CLIENT = 6;              //h5

    public static final HashMap<Integer,Integer> payClientMap = new HashMap(){{
        put(APP_CLIENT,ANDROID_CLIENT);
        put(IOS_CLIENT,ANDROID_CLIENT);
        put(SMALL_PROGRAM,WECHAT_MINAPP);
        put(SMALL_ALI_CLIENT,ALI_MINAPP);
    }};

    public static final String ORDER_LISTENER = "or_listener";

    /*----------------------------------------------------------*/


    /**签署常量**/
    public static final String FLOW_APP_ID = "flow.app.id";
    public static final String FLOW_APP_SECRET = "flow.app.secret";

    /**新券码兼容**/
    public static final Integer SEARCH_WAY_BY_CODE = 3;
    public static final Integer SEARCH_WAY_BY_NEW_WAY = 4;



    /**消息推送类型**/
    public static String UNIFIED_MESSAGE_PUSH = "20018";  //统一消息推送码
    /**消息推送类型**/
    public static String CUSTOM_MESSAGE_PUSH = "20020";  //统一消息推送码



    public static final int MDD_MAN_ROLE_ID = 2; //觅东东店铺管理员
    public static final int MDD_DY_ROLE_ID = 3; //觅东东店员身份
    public static final int DXSH_ROLE_ID = 4;        //电享生活app用户

    /**小程序消息行为**/
    public static final int JUMP_TARGET = 1;  //跳特定的页面
    /** 消息类型 **/
    //订单状态
    public static int DANK_ORDER_STATUS = 1;
    //订单状态之小程序订单
    public static int DANK_ORDER_STATUS_MINAPP = 1;
    //订单状态之觅东东订单
    public static int DANK_ORDER_STATUS_MDD = 2;

    //营销实况
    public static int DANK_MARKET_REALITY = 2;
    //营销实况
    public static int DANK_MARKET_REALITY_TYPE = 8;
    //其他通知
    public static int DANK_OTHER_INFORM = 3;
    //其他通知之小程序通知
    public static int DANK_OTHER_INFORM_MINAPP = 1;
    //其他通知之觅东东通知
    public static int DANK_OTHER_INFORM_MDD = 2;
    //其他通知之客户动态
    public static int DANK_OTHER_INFORM_CUSTOMER_NEWS = 3;
    //其他通知之社群消息
    public static int DANK_OTHER_INFORM_COM_NEW = 4;
    //其他通知之系统通知
    public static int DANK_OTHER_INFORM_SYS_NOTIFICATION = 5;

    /** 消息类型 **/
    //小程序消息
    public static int APP_NEWS_MINAPP = 1;
    //觅东东消息
    public static int APP_NEWS_MIDONGDONG = 2;
    //营销工具
    public static int APP_NEWS_MT_SMART = 3;
    //系统通知
    public static int APP_NEWS_SYSTEM = 4;

    /**权限**/
    public static final int VER_PERMISSION = 4;            //核销权限

    /**渠道状态**/
    public static final int MDD_CHANNEL_APPROVED = 1;            //审核通过

    /**小程序状态标识**/
    public static final int MINAPP_STATUS_FIRST_CREATE_SUCCESS = 2;       //小程序创建成功
    public static final int MINAPP_STATUS_CREATE_FAIL = 3;       //小程序创建失败
    public static final int MINAPP_STATUS_CREATE_ING = 5;       //小程序正在发布

    public static final int MINAPP_STATUS_CREATE_SUCCESS = 6;       //小程序发布成功
    public static final int MINAPP_STATUS_QUAR_ERROR = 7;       //小程序资质异常

    /**微信小程序当前审核进度**/
    public static final int MINAPP_WX_RELEASE_2 = 2;      //设置名称
    public static final int MINAPP_WX_RELEASE_3 = 3;      //设置头像
    public static final int MINAPP_WX_RELEASE_4 = 4;      //设置简介

    /**需求来源**/
    public static final int SERVICE_NEED_SYS = 0;      //系统
    public static final int SERVICE_NEED_APP = 1;      //APP
    public static final int SERVICE_NEED_FORMAL = 2;      //官网

    /**订单类型**/
    public static final int SERVICE_ORDER_SET = 1;      //增值服务
    public static final int SERVICE_NEED_SMS = 2;      //短信服务

    /**验证码类型**/
    public static final int REG_CODE_TYPE = 201;
    //电享生活app忘记密码验证码类型
    public static final int FORGET_CODE_TYPE = 202;
    public static final int LOGIN_CODE_TYPE = 203;
    public static final int DXSH_MINAPP_CODE_TYPE = 205;  //电享生活商户版小程序登陆

    /**测试环境使用的超级验证码**/
    public static final String SUPER_ID_CODE = "123456";

    /**登陆类型**/
    public static final Integer LOGIN_BY_CODE = 1; //验证码登陆
    public static final Integer LOGIN_BY_PWD = 2;  //密码登陆
    public static final Integer LOGIN_BY_WECHAT = 3;  //微信第三方登录

    /**登陆模式**/
    public static final int GOTO_TURN_BUSINESS = 2; //切换店铺

    /**消息类型**/
    //订单动态消息
    public static final int DXSH_APP_NEW_ORDER_STATUS = 1;
    //小程序订单
    public static final int DXSH_APP_NEW_ORDER_MINAPP_STATUS = 1;
    //觅东东订单
    public static final int DXSH_APP_NEW_ORDER_MDD_STATUS = 2;

    public static final int DXSH_APP_NEW_MARKET_REALITY = 2;  //营销实况消息
    public static final int DXSH_APP_NEW_MARKET_REALITY_TYPE = 1;  //营销消息


    public static final int DXSH_APP_NEW_ORTHER = 3;  //其他通知消息
    public static final int DXSH_APP_NEW_ORTHER_MINAPP = 1;  //小程序通知
    public static final int DXSH_APP_NEW_ORTHER_MDD = 2;  //觅东东其他通知
    //其他通知之系统通知
    public static int DXSH_APP_NEW_ORTHER_SYS = 5; //系统通知


    /**觅东东券码使用情况**/
    public static final int MDD_CODE_NO_USE = 0;
    public static final int MDD_CODE_NO_DATE_TO_USE = 4;

    /**其他渠道的券码生成规则**/
    public static final String CODE_MARKETING_TOOLS = "0100";
    public static final String CODE_SAAS_ZT = "0200";

    /**统一核销的券码区分**/
    public static final String CODE_TYPE_MDD = "MDD";
    public static final String CODE_TYPE_YXGJ = "YXGJ";
    public static final String CODE_TYPE_SAASZT = "saaszt";

    /**原来券类型**/
    public static final int CODE_TYPE_MDD_BUY = 1;
    public static final int CODE_TYPE_MDD_RECE = 2;

    /**营销工具活动券子类型**/
    public static final int TICKET_TYPE_MAN_JIAN = 1;
    public static final int TICKET_TYPE_ZHE_KOU = 2;
    public static final int TICKET_TYPE_LIN_PIN = 3;

    /**觅东东订单类型**/
    public static final int MDD_ORDER_GROUP_BUY_TYPE = 1;
    public static final int MDD_ORDER_MAN_DAN_TYPE = 2;
    public static final int MDD_ONLINE_TYPE = 1;

    /**电享生活商户版消息**/
    public static final int SYSTEM_MESSAGE = 0;
    public static final int SYSTEM_MESSAGE_BUSINE_BUSINESS_AUDIT = 5;
    public static final int SYSTEM_MESSAGE_BUSINESS_OFFLINE = 6;
    public static final int SYSTEM_MESSAGE_BUSINE_BUSINESS_ERROR = 8;
    public static final int SYSTEM_MESSAGE_BUSINE_GROUP_BUY_AUDIT = 9;
    public static final int SMBUSINE_GROUP_BUY_FORCED_OFFLINE = 11;
    public static final int SMBUSINE_GROUP_MESSAGE_FORCE_DELETE = 13;
    public static final int SMBUSINE_PAYID_CONFIRM = 15;

    /**订单类型**/
    public static final int  addedType = 1;  //增值服务类型
    public static final int  smsType = 2;  //短信服务类型

    /**觅东东新流程状态区分**/
    public static final int MDD_ALREAD_CLAIM_BUSINESS = 2;  //认领了店铺
    public static final int MDD_SUBMIT_SPE_INFO = 3;  //提交了专属资料

    /**关联商圈状态**/
    public static final int MINAPP_NON_BIND_FLAG = 0;  //未关联商圈
    public static final int MINAPP_ALREADY_BIND_FLAG = 1;  //已关联商圈
    public static final int MINAPP_WAIT_CONFIRM_FLAG = 2;  //待商圈确认状态


    /**数据宝小程序前端状态标识**/
    public static final int MINAPP_STATUS_WAIT_CREATE = 1;       //等待创建小程序

    /**客户分群类型**/
    public static final int CDP_CLIENT_ALL_TYPE = 1;       //全部客户
    public static final int CDP_CLIENT_MODEL_TYPE = 2;       //典型客户
    public static final int CDP_CLIENT_HIGHMONEY_TYPE = 3;       //高消费客户
    public static final int CDP_CLIENT_RUNOFF_TYPE = 4;       //流失中客户
    public static final int CDP_CLIENT_POTENTIAL_TYPE = 5;       //潜力顾客
    public static final int CDP_CLIENT_LOWMONEY_TYPE = 6;       //低消费客户
    public static final int CDP_CLIENT_DEVELOPABLE_TYPE = 7;       //可发展客户
    public static final int CDP_CLIENT_ACTIVE_TYPE = 8;       //活动积极客户
    public static final int CDP_CLIENT_NONACTIVE_TYPE = 9;       //活动潜水客户
    public static final int CDP_CLIENT_SENSITIVE_TYPE = 10;       //活动敏感客户
    public static final int CDP_CLIENT_NONSENSITIVE_TYPE = 11;       //活动无感客户

    /**统计维度**/
    public static final String CDP_DAY_YESTERDAY = "1";     //昨日
    public static final String CDP_DAY_SERVEN = "7";       //7天内
    public static final String CDP_DAY_THIRTY = "30";       //30天
    public static final String CDP_DAY_HALFYEAR = "180";     //半年

    /**小程序前端的几种状态**/
    public static final int MINAPP_FRONT_STATUS_CREATE_SUCCESS = 2; //小程序创建成功
    public static final int MINAPP_FRONT_STATUS_QU_ERROR = 3; //小程序资质异常
    public static final int MINAPP_FRONT_STATUS_CREATE_FAIL = 4; //小程序创建失败
    public static final int MINAPP_FRONT_STATUS_RELEASE_ING = 5; //小程序正在发布
    public static final int MINAPP_FRONT_STATUS_RELEASE_SUCCESS = 6; //小程序发布成功

    /**商圈相关操作编码**/
    public static final String GROUP_CANCEL_APPLY_CODE = "60001"; //取消关联申请弹窗
    public static final String GROUP_BIND_SUCCESS_CODE = "60002"; //关联商圈成功弹窗
    public static final String GROUP_REJECT_CANCEL_CODE = "60003"; //商圈拒绝取消关联弹窗
    public static final String GROUP_CANCEL_SUCCESS_CODE = "60004"; //取消关联商圈成功弹窗
    public static final String GROUP_DIVIDED_CONFIRM_CODE = "60005"; //分账比例确认弹窗


    public static final String BUSINESS_DXSH_PREFIX = "B_DXSH_";

    /**觅东东数据宝服务类型**/
    public final static int MY_SERVICE_TYPE_1 = 1;    //数据宝服务
    public final static int MY_SERVICE_TYPE_2 = 2;    //小程序服务
    public final static int MY_SERVICE_TYPE_3 = 3;    //营销服务

    /**觅东东数据宝服务状态**/
    public final static int PAY_STATUS_EXPIRE = -2;    //支付过期
    public final static int PAY_NO_PAY = 0;    //未支付


    /**觅东东数据宝服务状态**/
    public final static int PAY_STATUS_NO_START = 0;    //未开始
    public final static int PAY_STATUS_ING = 1;    //服务中
    public final static int PAY_STATUS_FINISH = 2;    //已完成
}
